﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace LiveNetSampleWebsite
{
    /// <summary>
    /// Summary description for LoadAuthentication
    /// </summary>
    public class LoadAuthentication : LiveNet.Authentication.IHttpAuthenticationObtainer
    {
        #region IHttpAuthenticationObtainer Members
        
        public void Get(HttpContext context, out string userId, out string token)
        {
            // This section is where you would have your code
            // to retrieve the userID and the token, whether it
            // be from a cookie, URL string or database.
            userId = HttpUtility.UrlDecode(context.Request.QueryString["oh"]);
            token = "A:20080122T134905Z:dev.live.com:HmGgtO7L3wdlLbpsBQzSlKkaUPOvLc6SLJaLBdNhBrZYIBXCGXoCmYhT6zocmaqUBfWJzWxrX/YhE16PbBTdd3B++GG3Lkh2vGEXOu16kQ7MZ8eVFp0Q4fJfZX0mbPZD5FftA7eN4mScglQ2whS6UWzeLf75A3upFkCTy4ixV43c8hRlPESJbpDiTISQsup5w7A3KpL/fc9Lx7QnIDibOKnbOg2Ez3HBxUKPyR0MQ/CbbYGXSxY1fuKjFtKdvFQMWP+ySejdGrvsg+N805IOHN5yjaKNqwqHIInBUlO9EK/llnaoVT1gjAt8TOCd59VBwwFSmsruFR97z1BcoJdA1Q==";
        }

        #endregion
    }
}